package test.dao.repo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.support.TransactionTemplate;

@Service
public class ServiceA {

    @Autowired
    private ServiceA serviceA;

    private TransactionTemplate transactionTemplate;

    public void hello(){
        transactionTemplate.execute(status -> {
            // 业务逻辑
            return null;
        });
    }
}
